Adopt ptr727.Utilities HttpClientFactory and drop local copies#257
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #257 +/- ##
========================================
Coverage 99.76% 99.76%
========================================
Files 15 15
Lines 232994 232994
Branches 243 243
========================================
Hits 232450 232450
Misses 462 462
Partials 82 82 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the LanguageTagsCreate codegen tool to stop using local copies of HttpClientFactory and AssemblyInfo, and instead consume the shared implementations from the external ptr727.Utilities package - while wiring the utilities package logging into the existing Serilog-based logger setup.
Changes:
- Add
ptr727.Utilitiesas a dependency (and centralize its version inDirectory.Packages.props), removing the tool’s direct dependency onMicrosoft.Extensions.Http.Resilience. - Delete the local
LanguageTagsCreate/HttpClientFactory.csandLanguageTagsCreate/AssemblyInfo.cscopies. - Switch downloads to
Utilities.HttpClientFactory.GetClient().GetStreamAsync(...)and configureUtilities.LogOptionsto use the repo’s logger factory.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| LanguageTagsCreate/Program.cs | Hooks ptr727.Utilities logging into the existing logger factory setup. |
| LanguageTagsCreate/LanguageTagsCreate.csproj | Swaps the tool’s dependency from local Http/Resilience usage to ptr727.Utilities. |
| LanguageTagsCreate/HttpClientFactory.cs | Removes the local HTTP client + resilience implementation (now provided by ptr727.Utilities). |
| LanguageTagsCreate/CreateTagData.cs | Repoints file download stream acquisition to Utilities.HttpClientFactory. |
| LanguageTagsCreate/AssemblyInfo.cs | Removes the local assembly metadata helper (now provided by ptr727.Utilities). |
| Directory.Packages.props | Adds central version pin for ptr727.Utilities. |
This was referenced Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the local
HttpClientFactoryandAssemblyInfocopies inLanguageTagsCreatewith the shared, reusable versions from ptr727.Utilities4.0.7(stable release).ptr727.Utilities(drops the now-transitiveMicrosoft.Extensions.Http.Resiliencedirect reference).LanguageTagsCreate/HttpClientFactory.csandLanguageTagsCreate/AssemblyInfo.cs.CreateTagData.cstoUtilities.HttpClientFactory.GetClient().GetStreamAsync(...).ILoggerlogging viaUtilities.LogOptions.SetFactory(LoggerFactory.CreateLoggerFactory())inProgram.cs(captured once and shared).Behavioral note
The download User-Agent now comes from the library's AOT-safe
AssemblyInfo(AppName/AppVersion) instead of the oldReleaseVersion. Cosmetic.Verification
dotnet buildclean (0 warnings / 0 errors).dotnet format style --verify-no-changesclean.dotnet test- 296 passed.🤖 Generated with Claude Code